using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Reports
{
    /// <summary>
    /// <para>Summary Reports</para>
    /// <para>Populates and creates demographic style summary reports for any boundary layer using Esri report templates.</para>
    /// <para>使用 Esri 报表模板填充和创建任何边界图层的人口统计样式汇总报表。</para>
    /// </summary>    
    [DisplayName("Summary Reports")]
    public class SummaryReports : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SummaryReports()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Boundary Layer</para>
        /// <para>The boundary layer containing one or more polygons that will be used to create reports.</para>
        /// <para>包含一个或多个将用于创建报表的面的边界图层。</para>
        /// </param>
        /// <param name="_report_templates">
        /// <para>Create Reports</para>
        /// <para>One or more report templates that will be used to create the summary report. You must be signed in to ArcGIS Online or have Business Analyst Data installed.</para>
        /// <para>将用于创建摘要报告的一个或多个报告模板。您必须登录到 ArcGIS Online 或已安装 Business Analyst Data。</para>
        /// </param>
        /// <param name="_reports_folder">
        /// <para>Output Folder</para>
        /// <para>The output location where the summary reports will be saved.</para>
        /// <para>将保存摘要报告的输出位置。</para>
        /// </param>
        public SummaryReports(object _in_features, List<object> _report_templates, object _reports_folder)
        {
            this._in_features = _in_features;
            this._report_templates = _report_templates;
            this._reports_folder = _reports_folder;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Summary Reports";

        public override string CallName => "ba.SummaryReports";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_in_features, _report_templates, _reports_folder, _summarization_options.GetGPValue(), _single_report.GetGPValue(), _formats, _store_id_field, _store_name_field, _store_address_field, _store_latitude_field, _store_longitude_field, _ring_id_field, _area_description_field, _title, _subtitle, _output_files];

        /// <summary>
        /// <para>Boundary Layer</para>
        /// <para>The boundary layer containing one or more polygons that will be used to create reports.</para>
        /// <para>包含一个或多个将用于创建报表的面的边界图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Boundary Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Create Reports</para>
        /// <para>One or more report templates that will be used to create the summary report. You must be signed in to ArcGIS Online or have Business Analyst Data installed.</para>
        /// <para>将用于创建摘要报告的一个或多个报告模板。您必须登录到 ArcGIS Online 或已安装 Business Analyst Data。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Reports")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _report_templates { get; set; }


        /// <summary>
        /// <para>Output Folder</para>
        /// <para>The output location where the summary reports will be saved.</para>
        /// <para>将保存摘要报告的输出位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _reports_folder { get; set; }


        /// <summary>
        /// <para>Summarization Options</para>
        /// <para><xdoc>
        ///   <para>Specifies how the data will be displayed in a report.</para>
        ///   <bulletList>
        ///     <bullet_item>Individual features—Selected report templates will be returned for each individual trade area polygon. This is the default.</bullet_item><para/>
        ///     <bullet_item>For the whole layer—Selected report templates will be returned representing only the full extent of the trade area.</bullet_item><para/>
        ///     <bullet_item>For both individual features and the whole layer—Selected report templates will be returned for both individual features and the whole layer.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定数据在报表中的显示方式。</para>
        ///   <bulletList>
        ///     <bullet_item>单个要素 - 将为每个单独的贸易区面返回所选报告模板。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>对于整个图层 - 将返回仅代表贸易区域全图范围的所选报告模板。</bullet_item><para/>
        ///     <bullet_item>对于单个要素和整个图层 - 将为单个要素和整个图层返回所选报告模板。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summarization Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _summarization_options_value _summarization_options { get; set; } = _summarization_options_value._INDIVIDUAL_FEATURES;

        public enum _summarization_options_value
        {
            /// <summary>
            /// <para>Individual features</para>
            /// <para>Individual features—Selected report templates will be returned for each individual trade area polygon. This is the default.</para>
            /// <para>单个要素 - 将为每个单独的贸易区面返回所选报告模板。这是默认设置。</para>
            /// </summary>
            [Description("Individual features")]
            [GPEnumValue("INDIVIDUAL_FEATURES")]
            _INDIVIDUAL_FEATURES,

            /// <summary>
            /// <para>For the whole layer</para>
            /// <para>For the whole layer—Selected report templates will be returned representing only the full extent of the trade area.</para>
            /// <para>对于整个图层 - 将返回仅代表贸易区域全图范围的所选报告模板。</para>
            /// </summary>
            [Description("For the whole layer")]
            [GPEnumValue("WHOLE_LAYER")]
            _WHOLE_LAYER,

            /// <summary>
            /// <para>For both individual features and the whole layer</para>
            /// <para>For both individual features and the whole layer—Selected report templates will be returned for both individual features and the whole layer.</para>
            /// <para>对于单个要素和整个图层 - 将为单个要素和整个图层返回所选报告模板。</para>
            /// </summary>
            [Description("For both individual features and the whole layer")]
            [GPEnumValue("BOTH_FEATURES_AND_LAYER")]
            _BOTH_FEATURES_AND_LAYER,

        }

        /// <summary>
        /// <para>Single Report</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a single output will be generated or if a separate file will be generated for each report.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—All reports will be combined into a single output.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A separate file will be generated for each selected report. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是生成单个输出，还是为每个报表生成单独的文件。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 所有报告将合并到单个输出中。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将为每个选定报表生成一个单独的文件。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Single Report")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _single_report_value _single_report { get; set; } = _single_report_value._false;

        public enum _single_report_value
        {
            /// <summary>
            /// <para>CREATE_SINGLE_REPORT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_SINGLE_REPORT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>CREATE_REPORT_PER_TEMPLATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_REPORT_PER_TEMPLATE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Report Output Formats</para>
        /// <para>The report output format. The default value is PDF.</para>
        /// <para>报表输出格式。默认值为 PDF。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Output Formats")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _formats { get; set; } = null;


        /// <summary>
        /// <para>Store ID Field</para>
        /// <para>The field that will be used to group data for each site in output reports. These field values are not displayed in the header.</para>
        /// <para>将用于对输出报表中每个站点的数据进行分组的字段。这些字段值不会显示在标题中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_id_field { get; set; } = null;


        /// <summary>
        /// <para>Store Name Field</para>
        /// <para>The field values that will be displayed in the output report headers that identify the site corresponding to each polygon's data.</para>
        /// <para>将在输出报告标题中显示的字段值，用于标识与每个面的数据对应的站点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_name_field { get; set; } = null;


        /// <summary>
        /// <para>Store Address Field</para>
        /// <para>The store address associated with each trade area.</para>
        /// <para>与每个贸易区域关联的商店地址。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Address Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_address_field { get; set; } = null;


        /// <summary>
        /// <para>Store Latitude Field</para>
        /// <para>The field that will contain the latitude coordinates (y field).</para>
        /// <para>将包含纬度坐标的字段（y 字段）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Latitude Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_latitude_field { get; set; } = null;


        /// <summary>
        /// <para>Store Longitude Field</para>
        /// <para>The field that will contain the longitude coordinates (x field).</para>
        /// <para>将包含经度坐标的字段（x 字段）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Longitude Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_longitude_field { get; set; } = null;


        /// <summary>
        /// <para>Ring ID Field</para>
        /// <para>The field that will control the presentation order of data for inputs with multiple polygons per site.</para>
        /// <para>该字段将控制每个站点具有多个面的输入的数据显示顺序。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ring ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _ring_id_field { get; set; } = null;


        /// <summary>
        /// <para>Area Description Field</para>
        /// <para>The field that will be displayed as the output template header with values corresponding to each input polygons' data.</para>
        /// <para>将显示为输出模板标题的字段，其值与每个输入面的数据相对应。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Description Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _area_description_field { get; set; } = null;


        /// <summary>
        /// <para>Report Title</para>
        /// <para>The title on the report header.</para>
        /// <para>报表标题上的标题。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Title")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _title { get; set; } = null;


        /// <summary>
        /// <para>Report Subtitle</para>
        /// <para>The subtitle on the report header. The default value is Prepared by Business Analyst Pro.</para>
        /// <para>报告标题上的副标题。默认值为 Prepared by Business Analyst Pro。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Subtitle")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _subtitle { get; set; } = null;


        /// <summary>
        /// <para>Output Files</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Files")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _output_files { get; set; }


        public SummaryReports SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}